/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.skycloud.bts.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author HAINN
 */
@Entity
@Table(name = "bts_ticket_type")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "BtsTicketType.findAll", query = "SELECT b FROM BtsTicketType b"),
    @NamedQuery(name = "BtsTicketType.findByTicketTypeId", query = "SELECT b FROM BtsTicketType b WHERE b.ticketTypeId = :ticketTypeId"),
    @NamedQuery(name = "BtsTicketType.findByTicketTypeName", query = "SELECT b FROM BtsTicketType b WHERE b.ticketTypeName = :ticketTypeName"),
    @NamedQuery(name = "BtsTicketType.findByDescription", query = "SELECT b FROM BtsTicketType b WHERE b.description = :description"),
    @NamedQuery(name = "BtsTicketType.findByStatus", query = "SELECT b FROM BtsTicketType b WHERE b.status = :status")})
public class BtsTicketType implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "TICKET_TYPE_ID")
    private Integer ticketTypeId;
    @Basic(optional = false)
    @Column(name = "TICKET_TYPE_NAME")
    private String ticketTypeName;
    @Column(name = "DESCRIPTION")
    private String description;
    @Basic(optional = false)
    @Column(name = "STATUS")
    private short status;

    public BtsTicketType() {
    }

    public BtsTicketType(Integer ticketTypeId) {
        this.ticketTypeId = ticketTypeId;
    }

    public BtsTicketType(Integer ticketTypeId, String ticketTypeName, short status) {
        this.ticketTypeId = ticketTypeId;
        this.ticketTypeName = ticketTypeName;
        this.status = status;
    }

    public Integer getTicketTypeId() {
        return ticketTypeId;
    }

    public void setTicketTypeId(Integer ticketTypeId) {
        this.ticketTypeId = ticketTypeId;
    }

    public String getTicketTypeName() {
        return ticketTypeName;
    }

    public void setTicketTypeName(String ticketTypeName) {
        this.ticketTypeName = ticketTypeName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public short getStatus() {
        return status;
    }

    public void setStatus(short status) {
        this.status = status;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (ticketTypeId != null ? ticketTypeId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof BtsTicketType)) {
            return false;
        }
        BtsTicketType other = (BtsTicketType) object;
        if ((this.ticketTypeId == null && other.ticketTypeId != null) || (this.ticketTypeId != null && !this.ticketTypeId.equals(other.ticketTypeId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.skycloud.bts.entity.BtsTicketType[ ticketTypeId=" + ticketTypeId + " ]";
    }
    
}
